package org.swift.mashup.engine;

public class MashupException extends Exception {
	private static final long serialVersionUID = 1L;

	// generic codes
	public static final int OTHER_EXCEPTION = -1;
	public static final int GENERIC_MASHUP_EXCEPTION = 0;
	public static final int GENERIC_IGNORABLE_MASHUP_EXCEPTION = 100;
	// codes for exceptions where service is unable to return results
	public static final int SERVICE_TIMEOUT = 200;
	public static final int INSUFFICIENT_PRIVLEGES_FOR_SERVICE = 201;
	public static final int SERVICE_FAILED_WITHIN_TIME_LIMIT = 202;
	public static final int SERVICE_UNREACHABLE = 202;

	private int mashupExceptionCode = 0;
	
	public MashupException (String message){
		super(message);
	}
	
	public MashupException (String message, Throwable cause){
		super(message,cause);
	}

	public MashupException (String message, Throwable cause, int mashupExceptionCode) {
		super(message,cause);
		this.mashupExceptionCode = mashupExceptionCode;
	}

	public int getMashupExceptionCode() {
		return this.mashupExceptionCode;
	}
}